package com.carlinfo.hospital.util;

import com.mchange.v2.c3p0.ComboPooledDataSource;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

/**
 * 单例模式
 */
@Component
public class DataSourceUtil
{
    private static ComboPooledDataSource dataSource = new ComboPooledDataSource("c3p0-config.xml");
    private DataSourceUtil()
    {
    }

    public static DataSource getInstance() {
        return dataSource;
    }
}
